﻿namespace ExamV5.RubricInfo
{
    using ExamV5;
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class OpertionMoreRubricInfo : Page
    {
        protected Button butDefault;
        protected Button butLook;
        protected CheckBoxList CBLFlag;
        protected DropDownList DDLOpertion;
        protected DropDownList DDLRubricType;
        protected DropDownList DDLSubject;
        protected HtmlForm form1;
        protected HtmlHead Head1;
        private HttpCookie httpCookie_0 = null;
        private HttpCookie httpCookie_1 = null;
        private HttpCookie httpCookie_2 = null;
        private HttpCookie httpCookie_3 = null;
        protected Label labRubricError;
        private PublicFun publicFun_0 = new PublicFun();
        protected RadioButtonList RBLIsShare;
        protected ScriptManager SM;
        protected TextBox txtEndDate;
        protected HtmlInputHidden txtRubricDoc;
        protected TextBox txtStartDate;
        protected UpdatePanel UPPart;

        protected void butDefault_Click(object sender, EventArgs e)
        {
            bool flag;
            this.labRubricError.Text = "";
            string str = "";
            int num = 0;
            string str2 = "";
            string str3 = this.DDLOpertion.SelectedItem.Value;
            switch (str3)
            {
                case null:
                    return;

                case "E":
                    this.labRubricError.Text = "";
                    switch (this.DDLRubricType.SelectedItem.Value)
                    {
                        case "A":
                            this.method_3();
                            break;

                        case "B":
                            this.method_4();
                            break;

                        case "C":
                            this.method_5();
                            break;

                        case "D":
                            this.method_6();
                            break;

                        case "E":
                            this.method_7();
                            break;

                        case "F":
                            this.method_8();
                            break;

                        case "G":
                            this.method_9();
                            break;

                        case "H":
                            this.method_10();
                            break;

                        case "J":
                            this.method_11();
                            break;
                    }
                    return;

                case "A":
                    str3 = this.DDLRubricType.SelectedItem.Value;
                    switch (str3)
                    {
                        case "A":
                            this.method_3();
                            break;

                        case "B":
                            this.method_4();
                            break;

                        case "C":
                            this.method_5();
                            break;

                        case "D":
                            this.method_6();
                            break;

                        case "E":
                            this.method_7();
                            break;

                        case "F":
                            this.method_8();
                            break;

                        case "G":
                            this.method_9();
                            break;

                        case "H":
                            this.method_10();
                            break;

                        case "J":
                            this.method_11();
                            break;
                    }
                    return;

                case "B":
                    str = "";
                    num = 0;
                    str2 = "update RubricInfo set IsDel='Y' where ID<>0";
                    if (this.ViewState["ManagPower"].ToString() != "Y")
                    {
                        str2 = str2 + " and CreatNumberNO='" + this.httpCookie_0.Value + "'";
                    }
                    for (num = 0; num < this.CBLFlag.Items.Count; num++)
                    {
                        if (this.CBLFlag.Items[num].Selected)
                        {
                            if (!(str.Trim() == ""))
                            {
                                str = str + " or Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                            else
                            {
                                str = " and (Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                        }
                    }
                    str = str + ")";
                    if (this.txtStartDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,CreatTime)>=Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtStartDate.Text.Trim()) + " 00:00:00')";
                    }
                    if (this.txtEndDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtEndDate.Text.Trim()) + " 23:59:59')>=Convert(dateTime,CreatTime)";
                    }
                    str2 = str2 + str + " and SubjectID='" + this.DDLSubject.SelectedItem.Value + "' and RubricType='" + this.DDLRubricType.SelectedItem.Value + "'";
                    this.publicFun_0.ExecuteSql(str2 + ";insert into SysLogInfo(LogDisp,EditUser,EditUserCode) values('批量禁用[" + this.DDLSubject.SelectedItem.Text + "]科目中的题目信息！','" + this.httpCookie_1.Value + "','" + this.httpCookie_0.Value + "')");
                    base.Response.Write("<script>alert('批量禁用试题操作成功！')</script>");
                    return;

                case "C":
                    str = "";
                    num = 0;
                    str2 = "update RubricInfo set IsDel='N' where ID<>0";
                    if (this.ViewState["ManagPower"].ToString() != "Y")
                    {
                        str2 = str2 + " and CreatNumberNO='" + this.httpCookie_0.Value + "'";
                    }
                    for (num = 0; num < this.CBLFlag.Items.Count; num++)
                    {
                        if (this.CBLFlag.Items[num].Selected)
                        {
                            if (!(str.Trim() == ""))
                            {
                                str = str + " or Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                            else
                            {
                                str = " and (Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                        }
                    }
                    str = str + ")";
                    if (this.txtStartDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,CreatTime)>=Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtStartDate.Text.Trim()) + " 00:00:00')";
                    }
                    if (this.txtEndDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtEndDate.Text.Trim()) + " 23:59:59')>=Convert(dateTime,CreatTime)";
                    }
                    str2 = str2 + str + " and SubjectID='" + this.DDLSubject.SelectedItem.Value + "' and RubricType='" + this.DDLRubricType.SelectedItem.Value + "'";
                    this.publicFun_0.ExecuteSql(str2 + ";insert into SysLogInfo(LogDisp,EditUser,EditUserCode) values('批量启用[" + this.DDLSubject.SelectedItem.Text + "]科目中的题目信息！','" + this.httpCookie_1.Value + "','" + this.httpCookie_0.Value + "')");
                    base.Response.Write("<script>alert('批量启用试题操作成功！')</script>");
                    return;

                default:
                {
                    if (!(str3 == "D"))
                    {
                        return;
                    }
                    str = "";
                    num = 0;
                    str2 = "delete RubricInfo  where ID<>0";
                    string strSql = "select ID from RubricInfo  where ID<>0";
                    if (this.ViewState["ManagPower"].ToString() != "Y")
                    {
                        str2 = str2 + " and CreatNumberNO='" + this.httpCookie_0.Value + "'";
                        strSql = strSql + " and CreatNumberNO='" + this.httpCookie_0.Value + "'";
                    }
                    for (num = 0; num < this.CBLFlag.Items.Count; num++)
                    {
                        if (this.CBLFlag.Items[num].Selected)
                        {
                            if (!(str.Trim() == ""))
                            {
                                str = str + " or Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                            else
                            {
                                str = " and (Flag='" + this.CBLFlag.Items[num].Value + "'";
                            }
                        }
                    }
                    str = str + ")";
                    if (this.txtStartDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,CreatTime)>=Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtStartDate.Text.Trim()) + " 00:00:00')";
                        strSql = strSql + " and Convert(dateTime,CreatTime)>=Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtStartDate.Text.Trim()) + " 00:00:00')";
                    }
                    if (this.txtEndDate.Text.Trim() != "")
                    {
                        str2 = str2 + " and Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtEndDate.Text.Trim()) + " 23:59:59')>=Convert(dateTime,CreatTime)";
                        strSql = strSql + " and Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtEndDate.Text.Trim()) + " 23:59:59')>=Convert(dateTime,CreatTime)";
                    }
                    str2 = str2 + str + " and SubjectID='" + this.DDLSubject.SelectedItem.Value + "' and RubricType='" + this.DDLRubricType.SelectedItem.Value + "'";
                    strSql = strSql + str + " and SubjectID='" + this.DDLSubject.SelectedItem.Value + "' and RubricType='" + this.DDLRubricType.SelectedItem.Value + "'";
                    string str4 = "," + this.publicFun_0.GetValues(strSql);
                    strSql = "select RubricS+RubricD+RubricB+RubricF+RubricA+RubricC+RubricT+RubricAN+RubricO+RubricJ as UseRubric from PaperData where  PaperID in(select PaperID from ExamUser where Flag<>'A' and ExamType='A')";
                    string[] strArray2 = ("," + this.publicFun_0.GetValues(strSql).Replace("#", ",")).Split(new char[] { ',' });
                    flag = false;
                    for (int i = 0; i < strArray2.Length; i++)
                    {
                        if ((strArray2[i].Trim() != "") && (str4.IndexOf("," + strArray2[i].Trim() + ",") != -1))
                        {
                            flag = true;
                            break;
                        }
                    }
                    break;
                }
            }
            if (flag)
            {
                base.Response.Write("<script>alert('因部分试题已被试卷使用并有考生作答记录所以试题无法删除！')</script>");
            }
            else
            {
                this.publicFun_0.ExecuteSql(str2 + ";insert into SysLogInfo(LogDisp,EditUser,EditUserCode) values('批量删除[" + this.DDLSubject.SelectedItem.Text + "]科目中的题目信息！','" + this.httpCookie_1.Value + "','" + this.httpCookie_0.Value + "')");
                base.Response.Write("<script>alert('批量删除试题操作成功！')</script>");
                this.txtRubricDoc.Value = "";
            }
        }

        protected void butLook_Click(object sender, EventArgs e)
        {
            this.method_13();
        }

        protected void DDLOpertion_SelectedIndexChanged(object sender, EventArgs e)
        {
            if ((((this.DDLOpertion.SelectedItem.Value != "B") && (this.DDLOpertion.SelectedItem.Value != "C")) && (this.DDLOpertion.SelectedItem.Value != "D")) && !(this.DDLOpertion.SelectedItem.Value == "E"))
            {
                this.butLook.Visible = false;
            }
            else
            {
                this.butLook.Visible = true;
            }
        }

        private string method_0(string string_0)
        {
            int num;
            string str = "";
            for (num = 0; num < this.CBLFlag.Items.Count; num++)
            {
                if (this.CBLFlag.Items[num].Selected)
                {
                    if (!(str.Trim() == ""))
                    {
                        str = str + " or Flag='" + this.CBLFlag.Items[num].Value + "'";
                    }
                    else
                    {
                        str = str + "and (Flag='" + this.CBLFlag.Items[num].Value + "'";
                    }
                }
            }
            if (str != "")
            {
                str = str + ")";
            }
            string_0 = string_0.Replace("'", "’").Replace("<br />", "<br>").Replace("<BR />", "<br>");
            string[] strArray = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
            for (num = 0; num < strArray.Length; num++)
            {
                if (strArray[num].Trim().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<br>", "").Replace("<BR>", "") != "")
                {
                    string[] strArray2 = strArray[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                    if (this.publicFun_0.GetValues("select ID from RubricInfo where RubricTitle like '%" + strArray2[0].Trim().Replace("'", "‘").Replace(";", "；").Replace("(", "（").Replace(")", "）") + "%'" + str, "ID") != "")
                    {
                        return strArray2[0].Trim();
                    }
                }
            }
            return "";
        }

        private void method_1(string string_0, string string_1)
        {
            if (this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='RubricLoop'", "ParmValue").Trim().Trim() == "Y")
            {
                string str13 = this.method_0(string_0);
                if (str13 != "")
                {
                    base.Response.Write("<script>alert('" + str13 + "试题在题库中已经存在，请仔细核实！')</script>");
                    this.labRubricError.Text = str13 + "试题在题库中已经存在，请仔细核实！";
                    return;
                }
            }
            string str10 = "";
            string str9 = "N";
            string str3 = "A";
            string str5 = "";
            string str6 = "";
            string str7 = "";
            string str8 = "";
            string str11 = "";
            int index = 0;
            string str4 = "";
            int num2 = 0;
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            Random random = new Random();
            SqlCommand command = null;
            try
            {
                int num;
                string[] strArray2;
                string[] strArray3;
                int num4;
                int num5;
                string_0 = string_0.Replace("'", "’").Replace("<br />", "<br>").Replace("<BR />", "<br>").Replace("\r\n", "");
                string str2 = string_1;
                switch (str2)
                {
                    case "A":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().Replace("　", " ").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<br>", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            int maxValue = 0x2710;
                            maxValue = 0x2710 + num;
                            str10 = random.Next(maxValue).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            for (num4 = 0; num4 < 10; num4++)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                            }
                            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                            {
                                index = 9;
                                str11 = strArray3[8].Trim();
                            }
                            else
                            {
                                index = 8;
                                str11 = "";
                            }
                            str2 = strArray3[index].Trim().ToLower().Replace("　", "").Replace("&nbsp;", " ").Replace("<br />", "").Replace("<br>", "");
                            switch (str2)
                            {
                                case null:
                                    break;

                                case "难":
                                    str6 = "A";
                                    goto Label_1E98;

                                case "较难":
                                    str6 = "B";
                                    goto Label_1E98;

                                case "中等":
                                    str6 = "C";
                                    goto Label_1E98;

                                default:
                                    if (!(str2 == "较易"))
                                    {
                                        if (!(str2 == "容易"))
                                        {
                                            break;
                                        }
                                        str6 = "E";
                                    }
                                    else
                                    {
                                        str6 = "D";
                                    }
                                    goto Label_1E98;
                            }
                            str6 = "C";
                        Label_1E98:;
                            str7 = this.method_12(strArray3[1]) + "#" + this.method_12(strArray3[2]) + "#" + this.method_12(strArray3[3]) + "#" + this.method_12(strArray3[4]) + "#" + this.method_12(strArray3[5]) + "#" + this.method_12(strArray3[6]);
                            str8 = strArray3[7].Trim().ToUpper().Replace("　", "").Replace(" ", "").Replace("&NBSP;", "").Replace("&nbsp;", "").Replace("<BR />", "").Replace("<BR>", "").Replace("Ａ", "A").Replace("Ｂ", "B").Replace("Ｃ", "C").Replace("Ｄ", "D").Replace("Ｅ", "E").Replace("Ｆ", "F");
                            for (num2 = 0; num2 < this.CBLFlag.Items.Count; num2++)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7.Replace("<BR>", "").Replace("&nbsp;", " ").Replace("<br />", "").Replace("<br>", "");
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                            }
                        }
                        break;

                    case "B":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<br>", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            int num9 = 0x2710;
                            num9 = 0x2710 + num;
                            str10 = random.Next(num9).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            num4 = 0;
                            while (num4 < 10)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                                num4++;
                            }
                            if (this.ViewState["IsRubricMemo"].ToString() == "N")
                            {
                                index = 8;
                                str11 = "";
                            }
                            else
                            {
                                index = 9;
                                str11 = strArray3[8].Trim();
                            }
                            str2 = strArray3[index].Trim().ToLower().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<br>", "").Replace("<BR>", "");
                            if (str2 != null)
                            {
                                if (str2 == "难")
                                {
                                    goto Label_1864;
                                }
                                if (str2 == "较难")
                                {
                                    goto Label_185B;
                                }
                                if (str2 == "中等")
                                {
                                    goto Label_1852;
                                }
                                if (str2 == "较易")
                                {
                                    str6 = "D";
                                    goto Label_186B;
                                }
                                if (str2 == "容易")
                                {
                                    goto Label_1849;
                                }
                            }
                            str6 = "C";
                            goto Label_186B;
                        Label_1849:
                            str6 = "E";
                            goto Label_186B;
                        Label_1852:
                            str6 = "C";
                            goto Label_186B;
                        Label_185B:
                            str6 = "B";
                            goto Label_186B;
                        Label_1864:
                            str6 = "A";
                        Label_186B:;
                            str7 = this.method_12(strArray3[1]) + "#" + this.method_12(strArray3[2]) + "#" + this.method_12(strArray3[3]) + "#" + this.method_12(strArray3[4]) + "#" + this.method_12(strArray3[5]) + "#" + this.method_12(strArray3[6]);
                            str8 = strArray3[7].Trim().ToUpper().Replace("　", "").Replace(" ", "").Replace("&NBSP;", "").Replace("&nbsp;", "").Replace("<BR />", "").Replace("<BR>", "").Replace("Ａ", "A").Replace("Ｂ", "B").Replace("Ｃ", "C").Replace("Ｄ", "D").Replace("Ｅ", "E").Replace("Ｆ", "F");
                            num2 = 0;
                            while (num2 < this.CBLFlag.Items.Count)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7.Replace("<BR>", "").Replace("&nbsp;", " ").Replace("<br />", "").Replace("<br>", "");
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                                num2++;
                            }
                        }
                        break;

                    case "C":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            int num8 = 0x2710;
                            num8 = 0x2710 + num;
                            str10 = random.Next(num8).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            num4 = 0;
                            while (num4 < 10)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                                num4++;
                            }
                            if (this.ViewState["IsRubricMemo"].ToString() == "N")
                            {
                                index = 2;
                                str11 = "";
                            }
                            else
                            {
                                index = 3;
                                str11 = strArray3[2].Trim();
                            }
                            str2 = strArray3[index].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "");
                            if (str2 != null)
                            {
                                if (str2 == "难")
                                {
                                    goto Label_03D1;
                                }
                                if (str2 == "较难")
                                {
                                    str6 = "B";
                                    goto Label_03D8;
                                }
                                if (str2 == "中等")
                                {
                                    goto Label_03C8;
                                }
                                if (str2 == "较易")
                                {
                                    str6 = "D";
                                    goto Label_03D8;
                                }
                                if (str2 == "容易")
                                {
                                    str6 = "E";
                                    goto Label_03D8;
                                }
                            }
                            str6 = "C";
                            goto Label_03D8;
                        Label_03C8:
                            str6 = "C";
                            goto Label_03D8;
                        Label_03D1:
                            str6 = "A";
                        Label_03D8:
                            str7 = "";
                            str8 = strArray3[1].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("对", "Y").Replace("错", "N");
                            num2 = 0;
                            while (num2 < this.CBLFlag.Items.Count)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7;
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                                num2++;
                            }
                        }
                        break;

                    case "D":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            num5 = 0x2710;
                            num5 = 0x2710 + num;
                            str10 = random.Next(num5).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            num4 = 0;
                            while (num4 < 10)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                                num4++;
                            }
                            if (this.ViewState["IsRubricMemo"].ToString() == "N")
                            {
                                index = 2;
                                str11 = "";
                            }
                            else
                            {
                                index = 3;
                                str11 = strArray3[2].Trim();
                            }
                            str2 = strArray3[index].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "");
                            if (str2 != null)
                            {
                                if (str2 == "难")
                                {
                                    goto Label_1264;
                                }
                                if (str2 == "较难")
                                {
                                    goto Label_125B;
                                }
                                if (str2 == "中等")
                                {
                                    str6 = "C";
                                    goto Label_126B;
                                }
                                if (str2 == "较易")
                                {
                                    goto Label_1252;
                                }
                                if (str2 == "容易")
                                {
                                    str6 = "E";
                                    goto Label_126B;
                                }
                            }
                            str6 = "C";
                            goto Label_126B;
                        Label_1252:
                            str6 = "D";
                            goto Label_126B;
                        Label_125B:
                            str6 = "B";
                            goto Label_126B;
                        Label_1264:
                            str6 = "A";
                        Label_126B:
                            str7 = "";
                            strArray3[1] = strArray3[1].Replace("　", "").Replace("&nbsp;", " ").Replace("<br />", "").Replace("<br>", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "");
                            string[] strArray4 = strArray3[1].Split(new char[] { '#' });
                            if (strArray4.Length >= 6)
                            {
                                str8 = strArray3[1].Trim();
                            }
                            if (strArray4.Length == 5)
                            {
                                str8 = strArray3[1].Trim() + "#";
                            }
                            if (strArray4.Length == 4)
                            {
                                str8 = strArray3[1].Trim() + "##";
                            }
                            if (strArray4.Length == 3)
                            {
                                str8 = strArray3[1].Trim() + "###";
                            }
                            if (strArray4.Length == 2)
                            {
                                str8 = strArray3[1].Trim() + "####";
                            }
                            if (strArray4.Length == 1)
                            {
                                str8 = strArray3[1].Trim() + "#####";
                            }
                            num2 = 0;
                            while (num2 < this.CBLFlag.Items.Count)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7;
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                                num2++;
                            }
                        }
                        break;

                    case "E":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            int num7 = 0x2710;
                            num7 = 0x2710 + num;
                            str10 = random.Next(num7).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            num4 = 0;
                            while (num4 < 10)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                                num4++;
                            }
                            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                            {
                                index = 3;
                                str11 = strArray3[2].Trim();
                            }
                            else
                            {
                                index = 2;
                                str11 = "";
                            }
                            str2 = strArray3[index].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "");
                            switch (str2)
                            {
                                case null:
                                    goto Label_0DB8;

                                case "难":
                                    str6 = "A";
                                    goto Label_0DBF;

                                case "较难":
                                    str6 = "B";
                                    goto Label_0DBF;

                                case "中等":
                                    str6 = "C";
                                    break;
                            }
                            if (str2 == "中等")
                            {
                                str6 = "C";
                            }
                            else if (!(str2 == "较易"))
                            {
                                if (!(str2 == "容易"))
                                {
                                    goto Label_0DB8;
                                }
                                str6 = "E";
                            }
                            else
                            {
                                str6 = "D";
                            }
                            goto Label_0DBF;
                        Label_0DB8:
                            str6 = "C";
                        Label_0DBF:
                            str7 = "";
                            str8 = strArray3[1].Trim();
                            num2 = 0;
                            while (num2 < this.CBLFlag.Items.Count)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7;
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                                num2++;
                            }
                        }
                        break;

                    case "J":
                        strArray2 = string_0.Replace("。。", "∷").Split(new char[] { '∷' });
                        for (num = 0; num < strArray2.Length; num++)
                        {
                            if (!(strArray2[num].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "") != ""))
                            {
                                continue;
                            }
                            num5 = 0x2710;
                            num5 = 0x2710 + num;
                            str10 = random.Next(num5).ToString();
                            strArray3 = strArray2[num].Replace("//", "⊥").Split(new char[] { '⊥' });
                            str5 = strArray3[0].Trim();
                            for (num4 = 0; num4 < 10; num4++)
                            {
                                if ((str5.Length > 4) && (str5.Substring(0, 4).ToUpper() == "<BR>"))
                                {
                                    str5 = str5.Substring(4);
                                }
                                if ((str5.Length > 6) && (str5.Substring(0, 6).ToLower() == "&nbsp;"))
                                {
                                    str5 = str5.Substring(6);
                                }
                            }
                            if (this.ViewState["IsRubricMemo"].ToString() == "N")
                            {
                                index = 2;
                                str11 = "";
                            }
                            else
                            {
                                index = 3;
                                str11 = strArray3[2].Trim();
                            }
                            str2 = strArray3[index].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "");
                            switch (str2)
                            {
                                case null:
                                    break;

                                case "难":
                                    str6 = "A";
                                    goto Label_0913;

                                case "较难":
                                    str6 = "B";
                                    goto Label_0913;

                                case "中等":
                                    str6 = "C";
                                    goto Label_0913;

                                default:
                                    if (str2 == "较易")
                                    {
                                        str6 = "D";
                                    }
                                    else
                                    {
                                        if (!(str2 == "容易"))
                                        {
                                            break;
                                        }
                                        str6 = "E";
                                    }
                                    goto Label_0913;
                            }
                            str6 = "C";
                        Label_0913:
                            str7 = "";
                            str8 = strArray3[1].Trim();
                            for (num2 = 0; num2 < this.CBLFlag.Items.Count; num2++)
                            {
                                if (this.CBLFlag.Items[num2].Selected)
                                {
                                    str3 = this.CBLFlag.Items[num2].Value;
                                    str4 = "Insert into RubricInfo(RubricType,SubjectID,RubricTitle,Difficulty,OptionAnswer,OKAnswer,IsShare,ISCheck,Flag,IsUse,RndNumber,CreatNumberNO,OKMemo) Values(";
                                    command = new SqlCommand(str4 + "@RubricType,@SubjectID,@RubricTitle,@Difficulty,@OptionAnswer,@OKAnswer,@IsShare,@ISCheck,@Flag,@IsUse,@RndNumber,@CreatNumberNO,@OKMemo)", connection);
                                    command.Parameters.Add("@RubricType", SqlDbType.Char, 1).Value = this.DDLRubricType.SelectedItem.Value;
                                    command.Parameters.Add("@SubjectID", SqlDbType.Int).Value = this.DDLSubject.SelectedItem.Value;
                                    command.Parameters.Add("@RubricTitle", SqlDbType.Text).Value = str5;
                                    command.Parameters.Add("@Difficulty", SqlDbType.Char, 1).Value = str6;
                                    command.Parameters.Add("@OptionAnswer", SqlDbType.Text).Value = str7;
                                    command.Parameters.Add("@OKAnswer", SqlDbType.Text).Value = str8;
                                    command.Parameters.Add("@IsShare", SqlDbType.Char, 1).Value = this.RBLIsShare.SelectedItem.Value;
                                    command.Parameters.Add("@ISCheck", SqlDbType.Char, 1).Value = "N";
                                    command.Parameters.Add("@IsUse", SqlDbType.Char, 1).Value = str9;
                                    command.Parameters.Add("@RndNumber", SqlDbType.Int).Value = str10;
                                    command.Parameters.Add("@CreatNumberNO", SqlDbType.VarChar, 20).Value = this.httpCookie_0.Value;
                                    command.Parameters.Add("@OKMemo", SqlDbType.VarChar, 0x1388).Value = str11;
                                    command.Parameters.Add("@Flag", SqlDbType.Char, 1).Value = str3;
                                    command.ExecuteNonQuery();
                                    command.Dispose();
                                }
                            }
                        }
                        break;
                }
                this.publicFun_0.ExecuteSql("insert into SysLogInfo(LogDisp,EditUser,EditUserCode) values('批量添加[" + this.DDLSubject.SelectedItem.Text + "]科目题目信息！','" + this.httpCookie_1.Value + "','" + this.httpCookie_0.Value + "')");
                base.Response.Write("<script>alert('批量添加试题操作成功！')</script>");
                this.txtRubricDoc.Value = "";
                this.labRubricError.Text = "";
            }
            catch
            {
                base.Response.Write("<script>alert('批量操作失败！')</script>");
            }
            finally
            {
                connection.Close();
                connection.Dispose();
            }
        }

        private void method_10()
        {
            bool flag = false;
            string str = "";
            int num = 0;
            if (this.ViewState["IsRubricMemo"].ToString() == "N")
            {
                num = 3;
            }
            else
            {
                num = 4;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num)
                    {
                        flag = true;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str = strArray2[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                    if (strArray2[1].Trim() == "")
                    {
                        flag = true;
                        break;
                    }
                }
            }
            if (flag)
            {
                base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                this.labRubricError.Text = str + "试题有格式错误或正确答案为空！";
            }
            else if (!(this.DDLOpertion.SelectedItem.Value == "A"))
            {
                base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
            }
            else
            {
                this.method_1(str2, "E");
            }
        }

        private void method_11()
        {
            int num = 0;
            string str = "";
            int num2 = 0;
            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
            {
                num2 = 4;
            }
            else
            {
                num2 = 3;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num2)
                    {
                        num = 1;
                        if (strArray2[0].Trim() == "")
                        {
                            str = strArray[i];
                        }
                        else
                        {
                            str = strArray2[0].Trim();
                        }
                        break;
                    }
                    string[] strArray3 = strArray2[0].Replace("___", "┌").Split(new char[] { '┌' });
                    string[] strArray4 = strArray2[1].Split(new char[] { '#' });
                    if (strArray3.Length == 0)
                    {
                        num = 2;
                        str = strArray2[0].Trim();
                        break;
                    }
                    if (strArray3.Length != (strArray4.Length + 1))
                    {
                        num = 3;
                        str = strArray2[0].Trim();
                        break;
                    }
                }
            }
            switch (num)
            {
                case 0:
                    if (!(this.DDLOpertion.SelectedItem.Value == "A"))
                    {
                        base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
                    }
                    else
                    {
                        this.method_1(str2, "J");
                    }
                    break;

                case 1:
                    base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                    this.labRubricError.Text = str + "试题有格式错误！";
                    break;

                case 2:
                    base.Response.Write("<script>alert('" + str + "试题正确作答空不可以为空！')</script>");
                    this.labRubricError.Text = str + "试题正确作答空不可以为空！";
                    break;

                case 3:
                    base.Response.Write("<script>alert('" + str + "试题正确作答空数和标准答案不对应！')</script>");
                    this.labRubricError.Text = str + "试题正确作答空数和标准答案不对应！";
                    break;
            }
        }

        private string method_12(string string_0)
        {
            return string_0.Trim().Replace("#", "＃").Replace("A．", "").Replace("A.", "").Replace("a、", "").Replace("A、", "").Replace("(A)", "").Replace("（A）", "").Replace("(a)", "").Replace("（a）", "").Replace("（Ａ）", "").Replace("#", "＃").Replace("B．", "").Replace("B.", "").Replace("b、", "").Replace("B、", "").Replace("(B)", "").Replace("（B）", "").Replace("(b)", "").Replace("（b）", "").Replace("（Ｂ）", "").Replace("#", "＃").Replace("C．", "").Replace("C.", "").Replace("c、", "").Replace("C、", "").Replace("(C)", "").Replace("（C）", "").Replace("(c)", "").Replace("（c）", "").Replace("（Ｃ）", "").Replace("#", "＃").Replace("D．", "").Replace("D.", "").Replace("d、", "").Replace("D、", "").Replace("(D)", "").Replace("（D）", "").Replace("(d)", "").Replace("（d）", "").Replace("（Ｄ）", "").Replace("#", "＃").Replace("E．", "").Replace("E.", "").Replace("e、", "").Replace("E、", "").Replace("(E)", "").Replace("（E）", "").Replace("(e)", "").Replace("（e）", "").Replace("（Ｅ）", "").Replace("#", "＃").Replace("F．", "").Replace("F.", "").Replace("f、", "").Replace("F、", "").Replace("(F)", "").Replace("（F）", "").Replace("(f)", "").Replace("（f）", "").Replace("（Ｆ）", "");
        }

        private void method_13()
        {
            this.txtRubricDoc.Value = "";
            string str = "";
            string str2 = "";
            string str3 = "";
            string str4 = "";
            string str5 = "";
            string str6 = "";
            int num = 0;
            string cmdText = "select RubricTitle,Difficulty,OptionAnswer,OKAnswer,OKMemo from RubricInfo where ID<>0";
            if (this.ViewState["ManagPower"].ToString().Trim() != "Y")
            {
                cmdText = cmdText + " and CreatNumberNO='" + this.httpCookie_0.Value + "'";
            }
            for (num = 0; num < this.CBLFlag.Items.Count; num++)
            {
                if (this.CBLFlag.Items[num].Selected)
                {
                    if (!(str6.Trim() == ""))
                    {
                        str6 = str6 + " or Flag='" + this.CBLFlag.Items[num].Value + "'";
                    }
                    else
                    {
                        str6 = " and (Flag='" + this.CBLFlag.Items[num].Value + "'";
                    }
                }
            }
            str6 = str6 + ")";
            cmdText = cmdText + str6 + " and SubjectID='" + this.DDLSubject.SelectedItem.Value + "' and RubricType='" + this.DDLRubricType.SelectedItem.Value + "'";
            if (this.txtStartDate.Text.Trim() != "")
            {
                cmdText = cmdText + " and Convert(dateTime,CreatTime)>=Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtStartDate.Text.Trim()) + " 00:00:00')";
            }
            if (this.txtEndDate.Text.Trim() != "")
            {
                cmdText = cmdText + " and Convert(dateTime,'" + this.publicFun_0.CheckString(this.txtEndDate.Text.Trim()) + " 23:59:59')>=Convert(dateTime,CreatTime)";
            }
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(cmdText, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                str4 = reader["OKMemo"].ToString();
                str = reader["RubricTitle"].ToString();
                switch (reader["Difficulty"].ToString().Trim())
                {
                    case "A":
                        str5 = "难";
                        break;

                    case "B":
                        str5 = "较难";
                        break;

                    case "C":
                        str5 = "中等";
                        break;

                    case "D":
                        str5 = "较易";
                        break;

                    case "E":
                        str5 = "容易";
                        break;

                    default:
                        str5 = "中等";
                        break;
                }
                switch (this.DDLRubricType.SelectedItem.Value)
                {
                    case "A":
                    {
                        str2 = reader["OptionAnswer"].ToString().Trim().Replace("#", "//");
                        str3 = reader["OKAnswer"].ToString().Trim();
                        if (this.ViewState["IsRubricMemo"].ToString() == "N")
                        {
                            break;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str2.Replace("＃", "#") + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "B":
                    {
                        str2 = reader["OptionAnswer"].ToString().Trim().Replace("#", "//");
                        str3 = reader["OKAnswer"].ToString().Trim();
                        if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                        {
                            goto Label_0673;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str2.Replace("＃", "#") + "//" + str3 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "C":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString().Trim().Replace("Y", "对").Replace("N", "错");
                        if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                        {
                            goto Label_07C5;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "D":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString().Trim().Replace("#####", "");
                        str3 = reader["OKAnswer"].ToString().Trim().Replace("####", "");
                        str3 = reader["OKAnswer"].ToString().Trim().Replace("###", "");
                        str3 = reader["OKAnswer"].ToString().Trim().Replace("##", "");
                        if (str3.Substring(str3.Length - 1, 1) == "#")
                        {
                            str3 = str3.Substring(0, str3.Length - 1);
                        }
                        if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                        {
                            this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                        }
                        else
                        {
                            this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                        }
                        continue;
                    }
                    case "E":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString();
                        if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                        {
                            goto Label_0A99;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "F":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString();
                        if (this.ViewState["IsRubricMemo"].ToString() == "N")
                        {
                            goto Label_0BB9;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "G":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString();
                        if (this.ViewState["IsRubricMemo"].ToString() == "N")
                        {
                            goto Label_0CC9;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "H":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString();
                        if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
                        {
                            goto Label_0DC9;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    case "J":
                    {
                        str2 = "";
                        str3 = reader["OKAnswer"].ToString();
                        if (this.ViewState["IsRubricMemo"].ToString() == "N")
                        {
                            goto Label_0EE6;
                        }
                        this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                        continue;
                    }
                    default:
                    {
                        continue;
                    }
                }
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str2.Replace("＃", "#") + "//" + str3 + "//" + str5 + "。。</P>";
                continue;
            Label_0673:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str2.Replace("＃", "#") + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                continue;
            Label_07C5:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                continue;
            Label_0A99:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                continue;
            Label_0BB9:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                continue;
            Label_0CC9:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
                continue;
            Label_0DC9:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str4 + "//" + str5 + "。。</P>";
                continue;
            Label_0EE6:;
                this.txtRubricDoc.Value = this.txtRubricDoc.Value + "<P>" + str + "//" + str3 + "//" + str5 + "。。</P>";
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
        }

        private string method_2(string string_0)
        {
            string_0 = string_0.Replace("<p><br>", "");
            string_0 = string_0.Replace("<p><br><br>", "");
            string_0 = string_0.Replace("<p><br><br><br>", "");
            string_0 = string_0.Replace("<p><br><br><br><br>", "");
            string_0 = string_0.Replace("<p><br />", "");
            string_0 = string_0.Replace("<p><br /><br />", "");
            string_0 = string_0.Replace("<p><br /><br /><br />", "");
            string_0 = string_0.Replace("<p><br /><br /><br /><br />", "");
            string_0 = string_0.Replace("<p>", "");
            string_0 = string_0.Replace("<p align=right>", "");
            string_0 = string_0.Replace("<p align=center>", "");
            string_0 = string_0.Replace("<p align=left>", "");
            string_0 = string_0.Replace("</p>", "");
            string_0 = string_0.Replace("\r\n", "");
            string_0 = string_0.Replace("http://", "");
            string_0 = string_0.Replace("<P><BR>", "");
            string_0 = string_0.Replace("<P><BR><BR>", "");
            string_0 = string_0.Replace("<P><BR><BR><BR>", "");
            string_0 = string_0.Replace("<P><BR><BR><BR><BR>", "");
            string_0 = string_0.Replace("<P><BR />", "");
            string_0 = string_0.Replace("<P><BR /><BR />", "");
            string_0 = string_0.Replace("<P><BR /><BR /><BR />", "");
            string_0 = string_0.Replace("<P><BR /><BR /><BR /><BR />", "");
            string_0 = string_0.Replace("<P>", "");
            string_0 = string_0.Replace("<P ALIGN=RIGHT>", "");
            string_0 = string_0.Replace("<P ALIGN=CENTER>", "");
            string_0 = string_0.Replace("<P ALIGN=LEFT>", "");
            string_0 = string_0.Replace("</P>", "");
            string_0 = string_0.Replace("HTTP://", "");
            return string_0;
        }

        private void method_3()
        {
            string str = this.method_2(this.txtRubricDoc.Value.Trim());
            bool flag = false;
            string str2 = "";
            int num = 9;
            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
            {
                num = 10;
            }
            else
            {
                num = 9;
            }
            string[] strArray = str.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str2 = strArray[i];
                    if (strArray2.Length != num)
                    {
                        flag = true;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str2 = strArray2[0].Trim();
                        }
                        else
                        {
                            str2 = strArray[i];
                        }
                        break;
                    }
                    if (strArray2[7].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Length > 1)
                    {
                        flag = true;
                        break;
                    }
                    if (!(!(strArray2[1].Trim() == "") ? !(strArray2[2].Trim() == "") : false))
                    {
                        flag = true;
                        break;
                    }
                    if (!(!(strArray2[3].Trim() == "") || ((!(strArray2[4].Trim() != "") && !(strArray2[5].Trim() != "")) ? !(strArray2[6].Trim() != "") : false)))
                    {
                        flag = true;
                        break;
                    }
                    if (!((strArray2[4].Trim() == "") ? (!(strArray2[5].Trim() != "") ? !(strArray2[6].Trim() != "") : false) : true))
                    {
                        flag = true;
                        break;
                    }
                    if (!((strArray2[5].Trim() == "") ? !(strArray2[6].Trim() != "") : true))
                    {
                        flag = true;
                        break;
                    }
                }
            }
            if (flag)
            {
                base.Response.Write("<script>alert('" + str2 + "试题有格式错误！')</script>");
                this.labRubricError.Text = str2 + "试题有格式错误！";
            }
            else if (this.DDLOpertion.SelectedItem.Value == "A")
            {
                this.method_1(str, "A");
            }
            else
            {
                base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
            }
        }

        private void method_4()
        {
            string str = this.method_2(this.txtRubricDoc.Value.Trim());
            int num = 0;
            string str2 = "";
            int num2 = 0;
            if (this.ViewState["IsRubricMemo"].ToString() == "N")
            {
                num2 = 9;
            }
            else
            {
                num2 = 10;
            }
            string[] strArray = str.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str2 = strArray[i];
                    if (strArray2.Length != num2)
                    {
                        num = 1;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str2 = strArray2[0].Trim();
                        }
                        else
                        {
                            str2 = strArray[i];
                        }
                        break;
                    }
                    if (!(!(strArray2[1].Trim() == "") ? !(strArray2[2].Trim() == "") : false))
                    {
                        num = 1;
                        break;
                    }
                    if (!((strArray2[3].Trim() == "") ? (((strArray2[4].Trim() == "") && (strArray2[5].Trim() == "")) && !(strArray2[6].Trim() != "")) : true))
                    {
                        num = 1;
                        break;
                    }
                    if (!(!(strArray2[4].Trim() == "") || (!(strArray2[5].Trim() != "") ? !(strArray2[6].Trim() != "") : false)))
                    {
                        num = 1;
                        break;
                    }
                    if ((strArray2[5].Trim() == "") && (strArray2[6].Trim() != ""))
                    {
                        num = 1;
                        break;
                    }
                    string[] strArray3 = strArray2[7].Trim().Split(new char[] { '#' });
                    for (int j = 0; j < strArray3.Length; j++)
                    {
                        if (strArray3[j].Trim().ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Length > 1)
                        {
                            num = 2;
                            str2 = strArray2[0].Trim();
                            base.Response.Write("<script>alert('" + str2 + "试题没有提供或多选标准答案有误！')</script>");
                            this.labRubricError.Text = str2 + "试题没有提供或多选标准答案有误！";
                            return;
                        }
                    }
                    string str3 = this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='BRubricType'", "ParmValue").Trim();
                    if (!(!(str3.Trim() == "") ? !(str3.Trim() == "Y") : false))
                    {
                        if (strArray2[7].Trim().IndexOf("#") == -1)
                        {
                            num = 2;
                            str2 = strArray2[0].Trim();
                            break;
                        }
                        if (strArray3.Length <= 1)
                        {
                            num = 2;
                            str2 = strArray2[0].Trim();
                            break;
                        }
                    }
                    else if (strArray3.Length < 1)
                    {
                        num = 3;
                        str2 = strArray2[0].Trim();
                        break;
                    }
                }
            }
            switch (num)
            {
                case 0:
                    if (this.DDLOpertion.SelectedItem.Value == "A")
                    {
                        this.method_1(str, "B");
                    }
                    else
                    {
                        base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
                    }
                    break;

                case 1:
                    base.Response.Write("<script>alert('" + str2 + "试题有格式错误！')</script>");
                    this.labRubricError.Text = str2 + "试题有格式错误！";
                    break;

                default:
                    if (num == 2)
                    {
                        base.Response.Write("<script>alert('" + str2 + "试题没有提供或多选标准答案有误！')</script>");
                        this.labRubricError.Text = str2 + "试题没有提供或多选标准答案有误！";
                    }
                    else
                    {
                        base.Response.Write("<script>alert('" + str2 + "试题最少必须提供一个标准答案！')</script>");
                        this.labRubricError.Text = str2 + "试题最少必须提供一个标准答案！";
                    }
                    break;
            }
        }

        private void method_5()
        {
            int num = 0;
            string str = "";
            int num2 = 0;
            if (this.ViewState["IsRubricMemo"].ToString() == "N")
            {
                num2 = 3;
            }
            else
            {
                num2 = 4;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num2)
                    {
                        num = 1;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str = strArray2[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                    if ((strArray2[1].Trim() != "对") && (strArray2[1].Trim() != "错"))
                    {
                        num = 2;
                        str = strArray2[0].Trim();
                        break;
                    }
                }
            }
            if (num == 0)
            {
                if (!(this.DDLOpertion.SelectedItem.Value == "A"))
                {
                    base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
                }
                else
                {
                    this.method_1(str2, "C");
                }
            }
            else if (num == 1)
            {
                base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                this.labRubricError.Text = str + "试题有格式错误！";
            }
            else
            {
                base.Response.Write("<script>alert('" + str + "试题没有提供标准答案！')</script>");
                this.labRubricError.Text = str + "试题没有提供标准答案！";
            }
        }

        private void method_6()
        {
            int num = 0;
            string str = "";
            int num2 = 0;
            if (this.ViewState["IsRubricMemo"].ToString() == "N")
            {
                num2 = 3;
            }
            else
            {
                num2 = 4;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray4 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray4.Length != num2)
                    {
                        num = 1;
                        if (!(strArray4[0].Trim() == ""))
                        {
                            str = strArray4[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                    string[] strArray2 = strArray4[0].Replace("___", "┌").Split(new char[] { '┌' });
                    string[] strArray3 = strArray4[1].Split(new char[] { '#' });
                    if (strArray4[1].Trim() == "")
                    {
                        num = 3;
                        str = strArray4[0].Trim();
                        break;
                    }
                    if (strArray2.Length > 7)
                    {
                        num = 2;
                        str = strArray4[0].Trim();
                        break;
                    }
                    if (strArray2.Length != (strArray3.Length + 1))
                    {
                        num = 3;
                        str = strArray4[0].Trim();
                        break;
                    }
                }
            }
            if (num != 0)
            {
                if (num == 1)
                {
                    base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                    this.labRubricError.Text = str + "试题有格式错误！";
                }
                if (num == 2)
                {
                    base.Response.Write("<script>alert('" + str + "试题填空数最多六空！')</script>");
                    this.labRubricError.Text = str + "试题填空数最多六空！";
                }
                if (num == 3)
                {
                    base.Response.Write("<script>alert('" + str + "试题填空数和标准答案不对应！')</script>");
                    this.labRubricError.Text = str + "试题填空数和标准答案不对应！";
                }
            }
            else if (this.DDLOpertion.SelectedItem.Value == "A")
            {
                this.method_1(str2, "D");
            }
            else
            {
                base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
            }
        }

        private void method_7()
        {
            bool flag = false;
            string str = "";
            int num = 0;
            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
            {
                num = 4;
            }
            else
            {
                num = 3;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num)
                    {
                        flag = true;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str = strArray2[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                    if (strArray2[1].Trim() == "")
                    {
                        flag = true;
                        break;
                    }
                }
            }
            if (flag)
            {
                base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                this.labRubricError.Text = str + "试题有格式错误或正确答案为空！";
            }
            else if (!(this.DDLOpertion.SelectedItem.Value == "A"))
            {
                base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
            }
            else
            {
                this.method_1(str2, "E");
            }
        }

        private void method_8()
        {
            bool flag = false;
            string str = "";
            int num = 0;
            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
            {
                num = 4;
            }
            else
            {
                num = 3;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num)
                    {
                        flag = true;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str = strArray2[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                }
            }
            if (!flag)
            {
                if (this.DDLOpertion.SelectedItem.Value == "A")
                {
                    this.method_1(str2, "E");
                }
                else
                {
                    base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
                }
            }
            else
            {
                base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                this.labRubricError.Text = str + "试题有格式错误！";
            }
        }

        private void method_9()
        {
            bool flag = false;
            string str = "";
            int num = 0;
            if (!(this.ViewState["IsRubricMemo"].ToString() == "N"))
            {
                num = 4;
            }
            else
            {
                num = 3;
            }
            string str2 = this.method_2(this.txtRubricDoc.Value.Trim());
            string[] strArray = str2.ToUpper().Replace("　", "").Replace("&nbsp;", " ").Replace("<BR />", "").Replace("<BR>", "").Replace("。。", "∷").Split(new char[] { '∷' });
            for (int i = 0; i < strArray.Length; i++)
            {
                if (strArray[i].Trim() != "")
                {
                    string[] strArray2 = strArray[i].Replace("//", "⊥").Split(new char[] { '⊥' });
                    str = strArray[i];
                    if (strArray2.Length != num)
                    {
                        flag = true;
                        if (!(strArray2[0].Trim() == ""))
                        {
                            str = strArray2[0].Trim();
                        }
                        else
                        {
                            str = strArray[i];
                        }
                        break;
                    }
                    if (strArray2[1].Trim() == "")
                    {
                        flag = true;
                        break;
                    }
                }
            }
            if (flag)
            {
                base.Response.Write("<script>alert('" + str + "试题有格式错误！')</script>");
                this.labRubricError.Text = str + "试题有格式错误或正确答案为空！";
            }
            else if (!(this.DDLOpertion.SelectedItem.Value == "A"))
            {
                base.Response.Write("<script>alert('所有试题格式完全正确！')</script>");
            }
            else
            {
                this.method_1(str2, "E");
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.httpCookie_0 = new HttpCookie("ExamUserCode");
            this.httpCookie_0 = base.Request.Cookies["ExamUserCode"];
            this.httpCookie_1 = new HttpCookie("ExamUserName");
            this.httpCookie_1 = base.Request.Cookies["ExamUserName"];
            this.httpCookie_2 = new HttpCookie("ExamUserLevel");
            this.httpCookie_2 = base.Request.Cookies["ExamUserLevel"];
            this.httpCookie_3 = new HttpCookie("ExamDeptID");
            this.httpCookie_3 = base.Request.Cookies["ExamDeptID"];
            if ((this.httpCookie_0 != null) && (this.httpCookie_0.Value != ""))
            {
                base.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                base.Response.Cache.SetNoStore();
                this.httpCookie_0.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_0.Value));
                this.httpCookie_1.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_1.Value));
                this.httpCookie_2.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_2.Value));
                this.httpCookie_3.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_3.Value));
                if (!base.IsPostBack)
                {
                    if (this.publicFun_0.ReturnPaperData() != "Yes")
                    {
                        base.Response.Write("<script>alert('此版本暂未授权,请拔打(0)13870606104手机号进行授权！')</script>");
                    }
                    else
                    {
                        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
                        connection.Open();
                        SqlCommand command = new SqlCommand("select AddRubric,ManagRubric from UserPower where UserCode='" + this.httpCookie_0.Value + "'", connection);
                        SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
                        if (reader.Read())
                        {
                            this.ViewState["AddPower"] = reader["AddRubric"].ToString();
                            this.ViewState["ManagPower"] = reader["ManagRubric"].ToString();
                        }
                        reader.Close();
                        command.Dispose();
                        connection.Close();
                        connection.Dispose();
                        this.ViewState["IsRubricMemo"] = this.publicFun_0.GetValues("select ParmValue from SysParmInfo where ParmMemo='IsRubricMemo'", "ParmValue").Trim();
                        if (!(this.ViewState["IsRubricMemo"].ToString().Trim() == ""))
                        {
                            this.ViewState["IsRubricMemo"] = this.ViewState["IsRubricMemo"].ToString();
                        }
                        else
                        {
                            this.ViewState["IsRubricMemo"] = "N";
                        }
                        if (!(this.ViewState["AddPower"].ToString().Trim() != "Y") || !(this.ViewState["ManagPower"].ToString().Trim() != "Y"))
                        {
                            this.publicFun_0.LoadSubjectInfo(this.DDLSubject, this.httpCookie_0.Value, this.ViewState["ManagPower"].ToString(), "E", this.httpCookie_3.Value);
                            this.DDLSubject.Items.Insert(0, new ListItem("--请选择所属科目信息--", "0"));
                        }
                        else
                        {
                            this.butDefault.Visible = false;
                            base.Response.Write("<script>alert('添加或管理题库权限未开放！')</script>");
                        }
                    }
                }
            }
            else
            {
                base.Response.Write("<script language=javascript>top.location.href='../Index.htm';self.close();</script>");
            }
        }
    }
}

